//-----------------------------------------------------------------------
// <copyright file="a_CatTreeService.cs" company="AACECOM">
//     Copyright (c) AACECOM. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections;
using ThoiTrang.Entities;
using ThoiTrang.Data;
    
namespace ThoiTrang.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class a_CatTreeService
    {
        #region a_CatTree

        public static void Createa_CatTree(a_CatTree a_CatTree)
        {            
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                a_CatTreeDAO.Createa_CatTree(a_CatTree);
            }            
            catch (Exception ex)
            {                
                throw ex;
            }
        }        

        public static void Updatea_CatTree(a_CatTree a_CatTree)
        {            
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                a_CatTreeDAO.Updatea_CatTree(a_CatTree);
            }           
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static void Deletea_CatTree(int id)
        {            
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                a_CatTreeDAO.Deletea_CatTree(id);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }
        
        public static a_CatTree Geta_CatTree(int id)
        {            
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                return a_CatTreeDAO.Geta_CatTree(id);                
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_CatTree Geta_CatTree_mcid_scid(int mcid,int scid)
        {
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                return a_CatTreeDAO.Geta_CatTree_mcid_scid(mcid,scid);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }    

        public static a_CatTreeCollection Geta_CatTreeList(a_CatTreeColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                return a_CatTreeDAO.Geta_CatTreeList(orderBy, orderDirection);
            }            
            catch (Exception ex)
            {
               throw ex;
            }
        }        

        public static a_CatTreeCollection Geta_CatTreeList(a_CatTreeColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                return a_CatTreeDAO.Geta_CatTreeList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }            
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_CatTreeCollection Geta_CatTreeList_mcid(Int32 mcid, a_CatTreeColumns orderBy, OrderDirection orderDirection)
        {
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                return a_CatTreeDAO.Geta_CatTreeList_mcid(mcid,orderBy, orderDirection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        public static a_CatTreeCollection Geta_CatTreeList_mcid(Int32 mcid, a_CatTreeColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                return a_CatTreeDAO.Geta_CatTreeList_mcid(mcid,orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_CatTreeCollection Geta_CatTreeList_scid(Int32 scid, a_CatTreeColumns orderBy, OrderDirection orderDirection)
        {
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                return a_CatTreeDAO.Geta_CatTreeList_scid(scid, orderBy, orderDirection);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static a_CatTreeCollection Geta_CatTreeList_scid(Int32 scid, a_CatTreeColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {
            try
            {
                a_CatTreeDAO a_CatTreeDAO = new a_CatTreeDAO();
                return a_CatTreeDAO.Geta_CatTreeList_scid(scid, orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }        

        #endregion
    }
}